import { defineStore } from "pinia";
import { ref } from "vue";

export const useSCStore = defineStore('mystore', () => {


    //管理员的菜单
    const adminEnums = ref([
        {
            path: '/adminsetting',
            name: 'adminsetting',
            des: '基础数据',
            children: [
                {
                    path: '/adminsetting',
                    name: 'adminsetting',
                    des: '管理员设置'
                }, {
                    path: '/gridperson',
                    name: 'gridperson',
                    des: '网格人员管理'
                }, {
                    path: '/log',
                    name: 'log',
                    des: '日志列表'
                }
            ]
        }, {
            path: '/gridmanager',
            name: 'gridmanager',
            des: '网格管理',
            children: [
                {
                    path: '/physicalGrid',
                    name: 'physicalGrid',
                    des: '物理网格'
                }, {
                    path: '/logicalGrid',
                    name: 'logicalGrid',
                    des: '物理网格'
                },
            ]
        }, {
            path: '/gridmap',
            name: 'gridmap',
            des: '网格地图',
            children: [
                {
                    path: '/baidumap',
                    name: 'baidumap',
                    des: '物理网格地图'
                }
            ]
        }, {
            path: '/事件处置',
            name: 'event',
            des: '事件处置',
            children: [
                {
                    path: '/event-1',
                    name: 'event-1',
                    des: '处置事件1'
                }
            ]
        }

    ])
    //普通用户的菜单
    const gridperson = ref([[
        {
            path: '/adminsetting',
            name: 'adminsetting',
            des: '基础数据',
            children: [
                {
                    path: '/gridperson',
                    name: 'gridperson',
                    des: '网格人员管理'
                }
            ]
        }, {
            path: '/adminsetting',
            name: 'adminsetting',
            des: '网格管理',
            children: [
                {
                    path: '/physicalGrid',
                    name: 'physicalGrid',
                    des: '物理网格'
                }, {
                    path: '/logicalGrid',
                    name: 'logicalGrid',
                    des: '物理网格'
                },
            ]
        }, {
            path: '/gridmap',
            name: 'gridmap',
            des: '网格地图',
            children: [
                {
                    path: '/baidumap',
                    name: 'baidumap',
                    des: '物理网格地图'
                }
            ]
        },
    ]
    ])

    return { adminEnums, gridperson }

})